﻿using System.ComponentModel.DataAnnotations;

namespace Magic.Core.Service;

#region 输入参数
/// <summary>
/// 分页查询系统应用参数
/// </summary>
public class QuerySysAppPageInput : PageParamBase
{
    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 编码
    /// </summary>
    public string Code { get; set; }
}

/// <summary>
/// 新增系统应用参数
/// </summary>
public class AddSysAppParam
{
    /// <summary>
    /// 名称
    /// </summary>
    [Required(ErrorMessage = "Name不能为空")]
    public string Name { get; set; }

    /// <summary>
    /// 编码
    /// </summary>
    [Required(ErrorMessage = "Code不能为空")]
    public string Code { get; set; }

    /// <summary>
    /// 是否默认激活（Y-是，N-否）,只能有一个系统默认激活
    /// 用户登录后默认展示此系统菜单
    /// </summary>
    public string Active { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }
}

/// <summary>
/// 编辑系统应用参数
/// </summary>
public class EditSysAppParam : AddSysAppParam
{
    /// <summary>
    /// 应用id
    /// </summary>
    public long Id { get; set; }
}


/// <summary>
/// 修改系统应用状态
/// </summary>
public class ChangeSysAppStatusParam
{
    /// <summary>
    /// 应用Id
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 状态（字典 0正常 1停用 2删除）
    /// </summary>
    public CommonStatus Status { get; set; }
}

#endregion